package org.nursing.dao.impl;

import org.nursing.dao.UserDao;
import org.nursing.entity.User;
import org.nursing.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserDaoImpl implements UserDao {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User login(String loginName, String password) {
        return userMapper.login(loginName, password);
    }

    @Override
    public int register(User user) {
        return userMapper.register(user);
    }
}
